package screen;

import framework.Key;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.KeyEvent;
import framework.Util;
import framework.Screen;
import game.Global;

public class HelpScreen extends Screen {
    private Image title;


    public HelpScreen() {
        title = Util.loadImage(Global.IMG_GAME_HELP);
    }

    public void paint(Graphics g) {
        g.drawImage(title, 0, 0, null);

    }

    public void update() {

        if (Key.isTyped(KeyEvent.VK_ENTER)) {
            //retorna ao menu
            Screen.setCurrentScreen(new TitleScreen());
        }
        else
        if (Key.isDown(KeyEvent.VK_ESCAPE)) {
            // sair do jogo
            Screen.setCurrentScreen(new TitleScreen());
        }
    }
}
